package com.chuangjiangx.member.stored.web.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * @author cj-ch
 * @date 2018/7/18 上午10:52
 */
@Data
@ApiModel
public class CtobPayRequest {
    @ApiModelProperty(value = "商户ID",required = true)
    @NotNull
    @Min(value = 1)
    private Long merchantId;
    @ApiModelProperty(value = "门店ID")
    @Min(value = 1)
    private Long storeId;
    @ApiModelProperty(value = "商户用户ID")
    @Min(value = 1)
    private Long merchantUserId;
    @ApiModelProperty(value = "二维码ID")
    private String qrcodeId;

    @Min(value = 1)
    @ApiModelProperty(value = "会员ID,用户是会员时需要传",dataType = "Long",example = "25")
    private Long memberId;
    @ApiModelProperty(value = "支付入口,0-微信 1-支付宝 6-会员卡",required = true,allowableValues = "range[0,7]",example = "6")
    @NotNull
    @Min(value = 0)
    @Max(value = 7)
    private Integer payEntry;
    @ApiModelProperty(value = "用户标识",required = true)
    @NotBlank
    @Size(min = 16,max = 32)
    private String openid;
    @ApiModelProperty(value = "订单金额",required = true)
    @NotNull
    @DecimalMin(value = "0.01")
    private BigDecimal amount;
    @ApiModelProperty(value = "会员领取卡券ID")
    @Min(value = 1)
    private Long mbrHasCouponId;
    @ApiModelProperty(value = "支付时的websocketId")
    private String websocketId;
}
